<%--
  Created by IntelliJ IDEA.
  User: PC
  Date: 2024/3/26
  Time: 15:34
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>查看用户地址</title>
</head>
<body>
<input type="button" value="添加地址" id="add"><br>
<hr>
<table border="1" cellspacing="0" width="80%">
    <tr>
        <th>地址</th>
    </tr>

    <c:forEach items="${addressList}" var="address">
        <tr align="center">
            <td>${address.usersAddress}</td>
            <td><a href="/logindemo2/modifyAddress?addressID=${address.addressID}">修改</a> <a href="/logindemo2/deleteAddress?addressID=${address.addressID}"> 删除</a> <a href="/logindemo2/setLocalAddress2?addressID=${address.addressID}">设置为收货地址</a> </td>
        </tr>
    </c:forEach>


</table>
<script>
    document.getElementById("add").onclick = function (){
        location.href = "addAddress.jsp";
    }
</script>
<form action="showOrderForm" method="post">
    <input type="submit" value="设置地址完成后点击返回订单"><br>
</form>
</body>
</html>
